GXGetShapeStyleAttributes
You can use theGXGetShapeStyleAttributes
function to determine which style attributes are set for the style object of a particular shape.
gxStyleAttribute GXGetShapeStyleAttributes(gxShape source);
source
- A reference to the shape whose style attributes you want to determine.
- function result
- The style attributes of the source shape's style object.
DESCRIPTION
TheGXGetShapeStyleAttributes
function provides a convenient way to determine the style attributes of a shape without having to call theGXGetShapeStyle
function to obtain a reference to the shape's style object.As an example, to examine the
gxSourceGridStyle
flag of a style object associated with the shape object referenced by the variablesource
, you could use this code:
if (GXGetShapeStyleAttributes(source) & gxSourceGridStyle) { /* shape's style has gxSourceGridStyle attribute set */ }ThegxCenterFrameStyle
attribute is set only if both thegxInsideFrameStyle
and thegxOutsideFrameStyle
attributes are clear, so if you want to test for a centered frame style you need this code:
if (GXGetShapeStyleAttributes(source) & (gxInsideFrameStyle | gxOutsideFrameStyle) == gxCenterFrameStyle) { /* shape's style has gxCenterFrameStyle attribute set */ }ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory shape_is_nil SEE ALSO
For a discussion of style attributes, see "Style Attributes" on page 3-98.For an example of pen placement, see "Manipulating Pen Width and Placement" beginning on page 3-51.
For an example of constraining shapes to grids, see "Constraining Shape Geometries to Grids" on page 3-40 and "Constraining Shapes to Device Grids" on page 3-42.
To examine or alter the style attributes of a style object, use the
GXGetStyleAttributes
function, which is described on page 3-109. To alter the style attributes of a style object, use theGXSetStyleAttributes
function, which is described on page 3-110.To alter the style attributes of a style object associated with a particular shape, use the
GXSetShapeStyleAttributes
function, which is described in the next section.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help